package com.appcenter.jz.expandmodel;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;

public class UserDetaileInfo extends User {

    private String userCode;
    private String userId;
    private String userName;
    private String token;

    private  Object orgs;
    private  String roles="";
    private  Object roleLists;




    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }


    public Object getOrgs() {
        return orgs;
    }

    public void setOrgs(Object orgs) {
        this.orgs = orgs;
    }

    public String getRoles() {
        return roles;
    }

    public void setRoles(String roles) {
        this.roles = roles;
    }

    public Object getRoleLists() {
        return roleLists;
    }

    public void setRoleLists(Object roleLists) {
        this.roleLists = roleLists;
    }

    public UserDetaileInfo(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }
    public UserDetaileInfo(String username, String password,String userCode,String userId, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
        this.userCode=userCode;
        this.userId=userId;
        this.userName=username;
    }


    public UserDetaileInfo(String username, String password, String userCode,String userId,String token, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
        this.userCode=userCode;
        this.userId=userId;
        this.userName=username;
        this.token=token;
    }
}
